package com.zx.sys;

import java.util.Arrays;
import java.util.Scanner;

public class Test {

    static Scanner input = new Scanner(System.in);
    public static void main(String[] args) {
        match();
    }
    static public void match() {
        String msg1;
        String msg2;
        String msg3,msg4;
        char temp;
        System.out.println("请输入字符串1");
        msg1 = input.next();
        System.out.println("请输入字符串2");
        msg2 = input.next();
        char[] ch1 = msg1.toCharArray();
        char[] ch2 = msg1.toCharArray();
        Arrays.sort(ch1);
        Arrays.sort(ch2);
        if (msg1.length() == msg2.length()) {
            msg3 = String.valueOf(ch1);
            msg4 = String.valueOf(ch2);
            if (msg3.equals(msg4)) {
                System.out.println("这两个字符串匹配7a686964616fe78988e69d8331333363383332");
            }else{
                System.out.println("这两个字符串不匹配");
            }
        }else{
            System.out.println("长度不相同");
        }
    }
}
